//
//  HYFMeViewVC.m
//  hyf-BaiSi
//
//  Created by Bill on 14/6/16.
//  Copyright © 2016年 hyf. All rights reserved.
//

#import "HYFMeViewVC.h"
#import "HYFSettingViewController.h"
@implementation HYFMeViewVC

-(void)viewDidLoad{
    [super viewDidLoad];
    
    [self setNV];
    
    NSMutableDictionary *attr = [NSMutableDictionary dictionary];
    attr[NSFontAttributeName] = [UIFont boldSystemFontOfSize:25];
    [self.navigationController.navigationBar setTitleTextAttributes:attr];
    
}

-(void)setNV{

    UIBarButtonItem *night=[UIBarButtonItem itemWithImage:[UIImage imageNamed:@"mine-setting-icon"] highImage:[UIImage imageNamed:@"mine-setting-icon-click"] target:self action:@selector(night)];
    
    UIBarButtonItem *setting=[UIBarButtonItem itemWithImage:[UIImage imageNamed:@"mine-moon-icon"] selImage:[UIImage imageNamed:@"mine-moon-icon-click"] target:self action:@selector(setting:)];
    
    self.navigationItem.rightBarButtonItems=@[night,setting];
    
    self.navigationItem.title=@"我的";
    
}


-(void)night{

    HYFSettingViewController *settingVc=[[HYFSettingViewController alloc]init];
    //隐藏导航条
    settingVc.hidesBottomBarWhenPushed=YES;
    
    //跳转界面
    [self.navigationController pushViewController:settingVc animated:YES];

}

-(void)setting:(UIButton *)button{
    
    button.selected=!button.selected;
    NSLog(@"点击了设置按钮");

}


@end
